#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file https://www.gnu.org/licenses/gpl-3.0.txt

from pisi.actionsapi import autotools, pisitools

def setup():
	pisitools.dosed("makefile", "CFLAGS\ =", "CFLAGS +=")
	pisitools.dosed("makefile", "^COPT", "#COPT")

def build():
	autotools.make("LUADIR=/usr/include/lua5.4")

def install():
	pisitools.insinto("/usr/lib/lua/5.4", "lpeg.so")
	pisitools.insinto("/usr/share/lua/5.4", "re.lua")
